/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * EcranRespDeStage.java
 *
 * Created on 23 mai 2010, 01:06:48
 */

package gestiondestage;

import com.mysql.jdbc.Connection;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author Labassi Amine
 */
public class EcranRespDeStage extends javax.swing.JFrame {
    public static Connection cnt = null ;
    private int ID_ODS = 0 ;

    public void setID_ODS(int ID_ODS) {
        this.ID_ODS = ID_ODS;
    }
    /** Creates new form EcranRespDeStage */
    public EcranRespDeStage(Connection pCnt) {
        initComponents();
        cnt = pCnt ;
        this.setLocationRelativeTo(this.getParent());
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jMenuItemQuitterApp = new javax.swing.JMenuItem();
        jMenuAdmin = new javax.swing.JMenu();
        jMenuItemAccesApp = new javax.swing.JMenuItem();
        jMenu3 = new javax.swing.JMenu();
        jMenuItemCreerODS = new javax.swing.JMenuItem();
        jMenuItemModifODS = new javax.swing.JMenuItem();
        jMenuItemSuppODS = new javax.swing.JMenuItem();
        jMenuTuteurs = new javax.swing.JMenu();
        jMenuItemAjouterTut = new javax.swing.JMenuItem();
        jMenuItemSuppTut = new javax.swing.JMenuItem();
        jMenuItemListTut = new javax.swing.JMenuItem();
        jMenuQuest = new javax.swing.JMenu();
        jMenuItemQuestE = new javax.swing.JMenuItem();
        jMenuItemQuestEns = new javax.swing.JMenuItem();
        jMenuConvDS = new javax.swing.JMenu();
        jMenuItemConsuCDS = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("ISTY - Application de stage - Responsable des stages");

        jMenu1.setText("Application");

        jMenuItemQuitterApp.setText("Quitter");
        jMenuItemQuitterApp.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemQuitterAppActionPerformed(evt);
            }
        });
        jMenu1.add(jMenuItemQuitterApp);

        jMenuBar1.add(jMenu1);

        jMenuAdmin.setText("Administration");

        jMenuItemAccesApp.setText("Accès Application");
        jMenuAdmin.add(jMenuItemAccesApp);

        jMenuBar1.add(jMenuAdmin);

        jMenu3.setText("Offres de stage");

        jMenuItemCreerODS.setText("Créer une ODS");
        jMenuItemCreerODS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemCreerODSActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItemCreerODS);

        jMenuItemModifODS.setText("Modifier une ODS");
        jMenuItemModifODS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemModifODSActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItemModifODS);

        jMenuItemSuppODS.setText("Supprimer une ODS");
        jMenuItemSuppODS.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemSuppODSActionPerformed(evt);
            }
        });
        jMenu3.add(jMenuItemSuppODS);

        jMenuBar1.add(jMenu3);

        jMenuTuteurs.setText("Tuteurs");
        jMenuTuteurs.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuTuteursActionPerformed(evt);
            }
        });

        jMenuItemAjouterTut.setText("Ajouter Tuteur");
        jMenuItemAjouterTut.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemAjouterTutActionPerformed(evt);
            }
        });
        jMenuTuteurs.add(jMenuItemAjouterTut);

        jMenuItemSuppTut.setText("Supprimer Tuteur");
        jMenuItemSuppTut.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemSuppTutActionPerformed(evt);
            }
        });
        jMenuTuteurs.add(jMenuItemSuppTut);

        jMenuItemListTut.setText("Consulter liste Tuteurs");
        jMenuItemListTut.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jMenuItemListTutActionPerformed(evt);
            }
        });
        jMenuTuteurs.add(jMenuItemListTut);

        jMenuBar1.add(jMenuTuteurs);

        jMenuQuest.setText("Questionnaire");

        jMenuItemQuestE.setText("Questionnaire Elève");
        jMenuQuest.add(jMenuItemQuestE);

        jMenuItemQuestEns.setText("Questionnaire Enseignant");
        jMenuQuest.add(jMenuItemQuestEns);

        jMenuBar1.add(jMenuQuest);

        jMenuConvDS.setText("Convention de stage");

        jMenuItemConsuCDS.setText("Consulter Convention de stage");
        jMenuConvDS.add(jMenuItemConsuCDS);

        jMenuBar1.add(jMenuConvDS);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 886, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 502, Short.MAX_VALUE)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jMenuItemCreerODSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemCreerODSActionPerformed
        JPanelAjouterODS JPODS = null ;
        try {
            JPODS = new JPanelAjouterODS(cnt,this);
        } catch (SQLException ex) {
            Logger.getLogger(EcranRespDeStage.class.getName()).log(Level.SEVERE, null, ex);
        }
        this.setContentPane(JPODS);
        this.pack();
        this.setVisible(true);
    }//GEN-LAST:event_jMenuItemCreerODSActionPerformed

    private void jMenuItemModifODSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemModifODSActionPerformed
       JPanelChercherODS JPCODS = new JPanelChercherODS(this, cnt,1);
        this.setContentPane(JPCODS);
        this.pack();
        this.setVisible(true);
    }//GEN-LAST:event_jMenuItemModifODSActionPerformed

    private void jMenuItemQuitterAppActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemQuitterAppActionPerformed
        Runtime.getRuntime().exit(0);
    }//GEN-LAST:event_jMenuItemQuitterAppActionPerformed

    private void jMenuItemSuppODSActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSuppODSActionPerformed
        JPanelChercherODS JPCODS = new JPanelChercherODS(this, cnt,2);
        this.setContentPane(JPCODS);
        this.pack();
        this.setVisible(true);
    }//GEN-LAST:event_jMenuItemSuppODSActionPerformed

    private void jMenuTuteursActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuTuteursActionPerformed
      
    }//GEN-LAST:event_jMenuTuteursActionPerformed

    private void jMenuItemAjouterTutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemAjouterTutActionPerformed
       JPanelAjouterTut JPAT = new JPanelAjouterTut(this, cnt);
       this.setContentPane(JPAT);
       this.pack();
       this.setVisible(true);
    }//GEN-LAST:event_jMenuItemAjouterTutActionPerformed

    private void jMenuItemSuppTutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemSuppTutActionPerformed
        JPanelSuppTut JPST = new JPanelSuppTut(this, cnt);
       this.setContentPane(JPST);
       this.pack();
       this.setVisible(true);
    }//GEN-LAST:event_jMenuItemSuppTutActionPerformed

    private void jMenuItemListTutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItemListTutActionPerformed
        JPanelAffiTut JPAT = new JPanelAffiTut(this, cnt);
       this.setContentPane(JPAT);
       this.pack();
       this.setVisible(true);
    }//GEN-LAST:event_jMenuItemListTutActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu3;
    private javax.swing.JMenu jMenuAdmin;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JMenu jMenuConvDS;
    private javax.swing.JMenuItem jMenuItemAccesApp;
    private javax.swing.JMenuItem jMenuItemAjouterTut;
    private javax.swing.JMenuItem jMenuItemConsuCDS;
    private javax.swing.JMenuItem jMenuItemCreerODS;
    private javax.swing.JMenuItem jMenuItemListTut;
    private javax.swing.JMenuItem jMenuItemModifODS;
    private javax.swing.JMenuItem jMenuItemQuestE;
    private javax.swing.JMenuItem jMenuItemQuestEns;
    private javax.swing.JMenuItem jMenuItemQuitterApp;
    private javax.swing.JMenuItem jMenuItemSuppODS;
    private javax.swing.JMenuItem jMenuItemSuppTut;
    private javax.swing.JMenu jMenuQuest;
    private javax.swing.JMenu jMenuTuteurs;
    // End of variables declaration//GEN-END:variables

}
